﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Meebey.SmartIrc4net;
namespace IrcBot
{
    
    public partial class IRCChatForm : Form
    {
        string senderString;
        IrcFeatures irc;

        public IRCChatForm(string labelText,IrcFeatures myIrc,string IrcSender)
        {
            InitializeComponent();
            textBoxMessage.Text = labelText;
            irc = myIrc;
            senderString = IrcSender;
        }

        private void buttonOK_Click(object sender, EventArgs e)
        {
            if (textBoxChat.Text.Trim().Length != 0)
            {
                string answer = textBoxChat.Text;
                answer = answer.Replace("\r\n", "[Enter]");
                irc.SendMessage(SendType.Message, senderString, answer);
            }
            this.Close();
        }

        
    }
}
